package com.hust360.percent.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;


public class Area implements Serializable  {
	
	public static final String TABLE = "Area";
	
	public static final String ID = "id";
	
	public static final String IMG = "img";
	
	public static final String TITLE  = "title";
	
	public static final String FROM = "fromDate";
	
	public static final String DEADLINE = "deadline";
	
	public static final String CREATE  = "createDate";
	
	public static final String SHOP_LIST = "shopList";

	private static final long serialVersionUID = -8384203676559388393L;
	
	public static final String CITY_ID = "cityId";
	
	public static final String TYPE = "type";
	
	/**
	 * 区域的id
	 */
 	private Long id;
 	
	
 	/**
 	 *区域的图片的名字
 	 */
 	private String img;
 	
 	/**
 	 * 区域的文本标题
 	 */
 	private String title;
 	
 	/**
 	 * 活动起始时间
 	 */
 	private Date fromDate;
 	
 	/**
 	 * 活动结束时间
 	 */
 	private Date deadline;
 	
 	/**
 	 * 活动加入系统的时间
 	 */
 	private Date createDate;
 	
 	/**
 	 * 所在城市的id
 	 */
 	private Long cityId;
 	

	/**
 	 * 店铺的id列表
 	 */
 	private List<Long> shopList;
 	
 	/**
 	 * 店铺商品的类别
 	 */
 	private Integer type;
 	

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}



	public Date getDeadline() {
		return deadline;
	}

	public void setDeadline(Date deadline) {
		this.deadline = deadline;
	}



	public static long getSerialversionuid() {
		return serialVersionUID;
	}

 	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	

	public List<Long> getShopList() {
		return shopList;
	}

	public void setShopList(List<Long> shopList) {
		this.shopList = shopList;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((cityId == null) ? 0 : cityId.hashCode());
		result = prime * result
				+ ((createDate == null) ? 0 : createDate.hashCode());
		result = prime * result
				+ ((deadline == null) ? 0 : deadline.hashCode());
		result = prime * result
				+ ((fromDate == null) ? 0 : fromDate.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((img == null) ? 0 : img.hashCode());
		result = prime * result
				+ ((shopList == null) ? 0 : shopList.hashCode());
		result = prime * result + ((title == null) ? 0 : title.hashCode());
		result = prime * result + ((type == null) ? 0 : type.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Area other = (Area) obj;
		if (cityId == null) {
			if (other.cityId != null)
				return false;
		} else if (!cityId.equals(other.cityId))
			return false;
		if (createDate == null) {
			if (other.createDate != null)
				return false;
		} else if (!createDate.equals(other.createDate))
			return false;
		if (deadline == null) {
			if (other.deadline != null)
				return false;
		} else if (!deadline.equals(other.deadline))
			return false;
		if (fromDate == null) {
			if (other.fromDate != null)
				return false;
		} else if (!fromDate.equals(other.fromDate))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (img == null) {
			if (other.img != null)
				return false;
		} else if (!img.equals(other.img))
			return false;
		if (shopList == null) {
			if (other.shopList != null)
				return false;
		} else if (!shopList.equals(other.shopList))
			return false;
		if (title == null) {
			if (other.title != null)
				return false;
		} else if (!title.equals(other.title))
			return false;
		if (type == null) {
			if (other.type != null)
				return false;
		} else if (!type.equals(other.type))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Area [id=" + id + ", img=" + img + ", title=" + title
				+ ", fromDate=" + fromDate + ", deadline=" + deadline
				+ ", createDate=" + createDate + ", shopList=" + shopList + "]";
	}

	public Date getFromDate() {
		return fromDate;
	}

	public void setFromDate(Date fromDate) {
		this.fromDate = fromDate;
	}

	public Long getCityId() {
		return cityId;
	}

	public void setCityId(Long cityId) {
		this.cityId = cityId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}
 	
	
 	
}
